import { userStore } from '@/store/user'

/**
 * @desc: 判断菜单权限
 * @return {Boolean}
 */
const $store = userStore()
export function usePermission(handleName: string) {
  let permissions = $store.userRoles
  return !!permissions.find((item: string) => item.indexOf(handleName) !== -1)
}
